/*
    Copyright 2011 - Tommi Laukkanen (www.substanceofcode.com)

    This file is part of MeeToDo.

    MeeToDo is free software: you can redistribute it and/or modify
    it under the terms of the GNU Lesser General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    MeeToDo is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU Lesser General Public License for more details.

    You should have received a copy of the GNU Lesser General Public License
    along with MeeToDo. If not, see <http://www.gnu.org/licenses/>.
*/
import QtQuick 1.1

Item {
    id: toolbar
    width:  parent.width
    height: 24
    signal minimizeClicked()

    Rectangle {
        id: menubar
        height: parent.height
        width: parent.width
        state: "shown"
        color: "#000"
        /*gradient: Gradient {
            //GradientStop { position: 0.0; color: "#F2F2F2" }
            GradientStop { position: 0.08; color: "#000" }
            GradientStop { position: 0.5; color: "#000" }
            GradientStop { position: 1.0; color: "#29447E" } // "#1a1a1a"
        }*/

        MouseArea {
            anchors.fill: parent
            onClicked: {
                console.log("I'm not letting this click to leak underneath me...");
            }
        }
/*
        Text{
            text: "Kasvopus"
            anchors.centerIn: parent
            font.pixelSize: 24
            color: "#fff"
        }
*/
        Text {
            anchors.centerIn: parent
            font.pixelSize: 20
            text: "MeeToDo"
            color: "#eee"
        }

        Image {
            source: "../pics/minimize.png"
            x: 10
            anchors.verticalCenter: parent.verticalCenter
            width: 16
            height: 16
            MouseArea {
                id: minimizeIcon
                width: parent.width + 20
                height: parent.height + 20
                anchors.centerIn: parent
                onClicked: {
                    toolbar.minimizeClicked();
                }
            }
        }

        Image {
            source: "../pics/delete.png"
            x: parent.width - width - 10
            anchors.verticalCenter: parent.verticalCenter
            width: 16
            height: 16
            MouseArea {
                width: parent.width + 20
                height: parent.height + 20
                anchors.centerIn: parent
                onClicked: {
                    Qt.quit();
                }
            }
        }
    }

    Image {
        source: "../pics/top-shadow.png"
        width: parent.width
        x:0
        y:parent.height-1
    }

}
